<? 
		if(isset($_POST['btnsubmit']))
		{
			require("required/dbconnect.php"); 
			
			$slide_name=mysql_escape_string($_POST['slide_name']);
			$url=$_POST['url'];
			$order_id=$_POST['order_id'];
			$status=$_POST['status'];
			
			$insert=mysql_query("insert into os_slider(slide_name,url,status,order_id)value('$slide_name','$url','$status',$order_id)")or die(mysql_error());
			header("Location:slider_viewall.php?msg=1");	
		
		}
		else
		{
				
				require("required/dbconnect.php"); 
				require("required/function.php"); 
				require("required/header.php"); 
				
				checkAccess("allow_content_management",1); 
?>
				
				<table width="100%"  cellpadding="0" cellspacing="5" height="300">
				<script language="JavaScript" type="text/javascript" src="wysiwyg.js">
				</script>
				<script type="text/javascript" src="required/js/calendarDateInput.js"></script>		
					
					<td width="100%" align="left" valign="top">
					
						<form action="<?= $_SERVER['PHP_SELF'] ?>" name="frm" method="post" onSubmit="return validatefrm(this)">
						<table width="100%">
						
						<td class="title" colspan="3">
						Add New Slide
						</td>
						
						
						<tr>
							<td width="20%">Slide Name</td><td width="1%">:</td><td width="79%"><input class="text" type="text" name="slide_name" size="30" value="" maxlength="200"></td>
						</tr>
						<tr>
							<td>URL</td><td width="1%">:</td><td width="79%"><input class="text" type="text" name="url" size="30" value="http://" maxlength="200"></td>
						</tr>
						<tr>
							<td>Order ID</td><td>:</td><td><input class="text" type="text" name="order_id" size="2" value="" maxlength="3"></td>
						</tr>
						<tr>
							<td>Display pic</td><td>:</td><td>- Can be upload after submit - </td>
						</tr>
						<tr>
							<td>Publish</td><td>:</td><td><select name="status" class="text"><option value="1">Yes</option><option value="0">No</option></select></td>
						</tr>
						<tr>
							<td colspan="2"><input type="submit" value="Submit" name="btnsubmit" class="button"> <input type="button" onClick="history.go(-1)" value="Cancel" name="btnsubmit" class="button"></td>
						</tr>
						</table>
						</form>
					</td>
				 
				</table>
<? }require("required/footer.php"); ?>